<style>
	.delete-button{
		position: relative;
		float: right;
		margin-right: 5px;
		font-size: 14px;
		color: red;
	}
</style>
<div class="contain-wrap2" style="margin-top:30px; width:100%; ">
		  <table width="100%" border="1" class="dna">

		  	<tr>
				<td>
					<div id="profile_image_loader_div" style="display:none;"><img src="images/LoadingBar.gif" width="64px" height="64px"/></div>
				<?php
					if($dnauserinfo[0]["User_ID"]==$_SESSION['Allyfolio_User_ID'])
					{
				?>
					<a href="javascript:void(0)" onclick="return openFile('profile_pic_file')">
				<?php
					}
				?>
						<div >

							<img id="profile_pic_img" src="<?php echo "uploads/image_crop.php?image=/".$dnauserinfo[0]["Profile_Pic_Path"]."&width=250&height=250&cropratio=250:250";  ?>" />

						</div>
				<?php
					if($dnauserinfo[0]["User_ID"]==$_SESSION['Allyfolio_User_ID'])
					{
				?>
					</a>
				
					<form id="profile_pic_form" name="profile_pic_form" action="ajax/update_data.php?action=st_update" enctype="multipart/form-data" >

						<input type="file" id="profile_pic_file" name="profile_pic_file" style="display:none;" accept="image/*" onchange="return uploadProfilePic();" />

					</form>	
				<?php
					}
				?>
				</td>

				<td>
					<div id="large_profile_image_loader_div" style="display:none;"><img src="images/LoadingBar.gif" width="64px" height="64px"/></div>
				<?php
					if($dnauserinfo[0]["User_ID"]==$_SESSION['Allyfolio_User_ID'])
					{
				?>
					<a href="javascript:void(0)" onclick="return openFile('large_profile_pic_file')">
				<?php
					}
				?>
						<div >

							<img id="large_profile_pic_img" src="<?php echo "uploads/image_crop.php?image=/".$dnauserinfo[0]["Large_Profile_Pic_Path"]."&width=725&height=250&cropratio=725:250";  ?>" />

						</div>
				<?php
					if($dnauserinfo[0]["User_ID"]==$_SESSION['Allyfolio_User_ID'])
					{
				?>
					</a>

					<form id="large_profile_pic_form" name="large_profile_pic_form" action="ajax/update_data.php?action=st_update" enctype="multipart/form-data" >

						<input type="file" id="large_profile_pic_file" name="large_profile_pic_file" style="display:none;" accept="image/*" onchange="return uploadLargeProfilePic();" />

					</form>	
				<?php
					}
				?>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<div><?php echo $dnauserinfo[0]["Full_Name"]; ?></div>
				<?php
					if($_SESSION['Allyfolio_User_ID']>0 && $dnauserinfo[0]["User_ID"]!=$_SESSION['Allyfolio_User_ID'])
					{
				?>	
					<div>
	                <?php
	                	$qryFollower="select * from af_source_followers where User_ID=:User_ID and Follower_User_ID=:Follower_User_ID and Source_Type='PROFILE'";
	                	$condition[":User_ID"]=$dnauserinfo[0]["User_ID"];
						$condition[":Follower_User_ID"]=$_SESSION['Allyfolio_User_ID'];
						$arrFollower=$pdodbobj->fetch_array($pdodbobj->query($qryFollower,$condition));
						
						if(count($arrFollower)>0)
						{
					?>
						<a href="javascript:void(0);" onclick="return unFollowMe(<?php echo $_SESSION["Allyfolio_User_ID"]; ?>)">Un-Follow</a>
					<?php		
						}
						else
						{
					?>    
                    <a href="javascript:void(0);" onclick="return followMe(<?php echo $_SESSION["Allyfolio_User_ID"]; ?>,'PROFILE');">Follow</a>
                 <?php 
                 		}
                 	}
				 ?>  
                    </div>
				</td>
			</tr>

		  </table>

          <div class="clearfix"></div>

		  <div class="dna_structure" align="center" >		  	
		  	<?php
		  		if(strstr($_SERVER["SERVER_PROTOCOL"],"HTTPS")!="")
		  		{
					$proto="https://";
				}
				else
				{
					$proto="http://";
				}
				
				$currentURL=$proto.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
		  		
		  		$joinYear=date("Y",$dnauserinfo[0]["Registration_Date"]);
		  		$currentYear=date("Y",time());
		  	?>
		  		<table cellpadding="0" cellspacing="0" border="0" width="100%">
		  			<tr>
		  			<?php
		  				for($yearCount=$joinYear; $yearCount<=$currentYear; $yearCount++)
		  				{
					?>
						<td align="center">
							<a href="<?php echo $currentURL."&y=".$yearCount; ?>" title="<?php echo $yearCount; ?>"><?php echo $yearCount; ?></a>
						</td>
					<?php		
						}
					?>	
		  			</tr>
				</table>
				<img src="images/dna_struc.png" />
		  </div>

		   <div class="clearfix"></div>

		   <div class="dna_nav">

		   	<ul>
				<li><a href="dna.php?t=<?php echo $_REQUEST['t']; ?>">DNA</a></li>
				<li><a href="dna_profile.php?t=<?php echo $_REQUEST['t']; ?>">Profile</a></li>
				<li><a href="dna_myphoto.php?t=<?php echo $_REQUEST['t']; ?>">Photos</a></li>
				<li><a href="dna_myvideo.php?t=<?php echo $_REQUEST['t']; ?>">Videos</a></li>

				<li><a href="dna_friends.php?t=<?php echo $_REQUEST['t']; ?>">Friends</a></li>

				<li><a href="dna_blogs.php?t=<?php echo $_REQUEST['t']; ?>">Blogs</a></li>

				<li><a href="dna_cluster.php?t=<?php echo $_REQUEST['t']; ?>">Pick</a></li>

				<li><a href="dna_cluster.php?t=<?php echo $_REQUEST['t']; ?>">Cluster</a></li>

				<li><a href="dna_games.php?t=<?php echo $_REQUEST['t']; ?>">Games & Apps</a></li>

				<li><a href="dna_entertainment.php?t=<?php echo $_REQUEST['t']; ?>">Entertainment</a></li>

				<li>
					More...
					<ul>
						<li><a href="dna_place.php?t=<?php echo $_REQUEST['t']; ?>">Place</a></li>
						<li><a href="dna_events.php?t=<?php echo $_REQUEST['t']; ?>">Books</a></li>
						<li><a href="dna_events.php?t=<?php echo $_REQUEST['t']; ?>">Events</a></li>
						<li><a href="dna_notebook.php?t=<?php echo $_REQUEST['t']; ?>">Note Book</a></li>
					</ul>
				</li>

			</ul>

			<div style="clear:both;"></div>

		   </div>

		  

        </div>
        <script>
        function openFile(fileControlId)
	{
		$("#"+fileControlId).trigger("click");
	}
	
	function uploadLargeProfilePic()
	{
		if(document.getElementById("large_profile_pic_file").value!="")
		{
			document.getElementById("large_profile_image_loader_div").style.display="";
			formdata = false;
			if (window.FormData) {
				formdata = new FormData(document.getElementById("large_profile_pic_form"));
			}

			var xmlhttp;
			if (window.XMLHttpRequest)
			{// code for IE7+, Firefox, Chrome, Opera, Safari
				xmlhttp=new XMLHttpRequest();
			}
			else
			{// code for IE6, IE5
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			xmlhttp.onreadystatechange=function()
			{
				if (xmlhttp.readyState==4 && xmlhttp.status==200)
				{	
					var res=xmlhttp.responseText;	
					resArr=res.split("|~|");
					var divContent="";
					if(resArr[0]=="SUCCESS")
					{
						document.getElementById("large_profile_pic_img").src='uploads/image_crop.php?image=/'+resArr[1]+'&width=725&height=250&cropratio=725:250';
						document.getElementById("large_profile_image_loader_div").style.display="none";
					}
					else
					{
						document.getElementById("large_profile_image_loader_div").style.display="none";
						alertify.alert(resArr[1]);
					}
				}
			}	
			xmlhttp.open("POST","ajax_upload_profile_pic.php",true);
			xmlhttp.send(formdata);
		}
	}
	
	function uploadProfilePic()
	{
		if(document.getElementById("profile_pic_file").value!="")
		{
			document.getElementById("profile_image_loader_div").style.display="";
			formdata = false;
			if (window.FormData) {
				formdata = new FormData(document.getElementById("profile_pic_form"));
			}

			var xmlhttp;
			if (window.XMLHttpRequest)
			{// code for IE7+, Firefox, Chrome, Opera, Safari
				xmlhttp=new XMLHttpRequest();
			}
			else
			{// code for IE6, IE5
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			xmlhttp.onreadystatechange=function()
			{
				if (xmlhttp.readyState==4 && xmlhttp.status==200)
				{	
					var res=xmlhttp.responseText;	
					resArr=res.split("|~|");
					var divContent="";
					if(resArr[0]=="SUCCESS")
					{
						document.getElementById("profile_pic_img").src='uploads/image_crop.php?image=/'+resArr[1]+'&width=250&height=250&cropratio=250:250';
						document.getElementById("profile_image_loader_div").style.display="none";
					}
					else
					{
						document.getElementById("profile_image_loader_div").style.display="none";
						alertify.alert(resArr[1]);
					}
				}
			}	
			xmlhttp.open("POST","ajax_upload_profile_pic.php",true);
			xmlhttp.send(formdata);
		}
	}
		</script>